<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <div>
            <input type="text" placeholder="请输入需要查找的内容" name="keyword">
            <input type="button" value="查找" onclick="query()">
            <input type="button" value="添加" onclick="add()">
        </div>
        <div>
            <table id="tbData">
                <tr>
                    <th>
                        id:
                    </th>
                    <th>
                        姓名:
                    </th>
                    <th>
                        备注：
                    </th>
                </tr>
            </table>
        </div>
    </div>
    <script src="./jquery-3.6.0.min.js"></script>
    <script src="./js/config/baseUrl.js"></script>
    <script src="./js/init.js"></script>
    <script src="./js/js.js"></script>


    <script>
        function query() {
            let keyword = $('[name=keyword]').val();
            getListWithKeyword(keyword);
        }
        function add() {
            location.href = './createorupdate.html'
        }
        function update(id) {
            location.href = './createorupdate.html?id=' + id
        }
        function del(id) {
            daleteblog(id).then(data => {
                $(`[key=${id}]`).remove();
            })
        }
    </script>
</body>

</html>